import java.util.Scanner;
public class Area_1 {
    //无参数无返回值
    public static void main(String arg[]) {
        TrangleArea();
        SquareArea();
        RectangleArea();
    }
    public static void TrangleArea() {
        Scanner reader = new Scanner(System.in);
        System.out.println("请输入三角形的高：");
        double a = reader.nextDouble();
        System.out.println("请输入三角形的底：");
        double b = reader.nextDouble();
        System.out.println("三角形的面积是" + (a * b) / 2);
    }
    public static void SquareArea(){
        Scanner reader = new Scanner(System.in);
        System.out.println("请输入正方形的边长：");
        double a = reader.nextDouble();
        System.out.println("正方形的面积是" + a*a);
    }
    public static void RectangleArea(){
        Scanner reader = new Scanner(System.in);
        System.out.println("请输入长方形的长：");
        double a = reader.nextDouble();
        System.out.println("请输入长方形的宽：");
        double b = reader.nextDouble();
        System.out.println("长方形的面积是" + a*b);
    }


}